{layout name="layout" $title/}
<div class="col-md-9">
  
  <div class="panel panel-default  panel-info">
    <div class="panel-heading">
      <h3 class="panel-title text-center">设计文件<strong>{$typeText}</strong>列表（{$countall}）</h3>
    </div>
    <div class="panel-body">
      <div class="table-responsive">
        <table class="table table-striped .table-bordered  table-hover">
          <tr>
            <th class="">序号</td>
            <th class="">编号</td>
            <th class="">名称</td>
            <th class="">增加记录时间</td>
            <th class="">修改记录时间</td>
            <th class="">增加记录人</td>
            <th class="">是否某事物</td>
            <th class="">某物品数量</td>
            <th class="">状态</td>
            <th class="">操作</td>
          </tr>
          {volist name="documentList" id="document" }
          <tr class="">
            <td class="">{$i}</td>
            <td class="">{$document.code}</td>
            <td class="">{$document.title}</td>
            <td class="">{$document.create_time}</td>
            <td class="">{$document.update_time}</td>
            <td class="">{$document.create_name}</td>
            <td class="">{$document.is_sth}</td>
            <td class="">{$document.sth_num_unit}</td>
            <td class="">{$document.max_static_text}</td>
            <td class="">
              <a href="{:url('office/document/edit_process','id='.$document.id)}"><span class="glyphicon glyphicon-list" aria-hidden="true"></span></a>
              <a href="{:url('office/document/edit','id='.$document.id)}"><span class="glyphicon glyphicon-pencil {$document.create_code!==$Request.cookie.login_code?='hidden'}" aria-hidden="true"></span></a>
            </td>
          </tr>
          {/volist}
        </table>
      </div>
    </div>
  </div>
  
  
</div>
<script>
  var ctx1 = document.getElementById('myChart1').getContext('2d');
  var chart1 = new Chart(ctx1, {
    // The type of chart we want to create
    type: 'line',
    // The data for our dataset
    data: {
      labels: ["January", "February", "March", "April", "May", "June", "July"],
      datasets: [{
        label: "My First dataset",
        backgroundColor: 'rgb(255, 99, 132)',
        borderColor: 'rgb(255, 99, 132)',
        data: [0, 10, 5, 2, 20, 30, 45],
      }]
    },
    // Configuration options go here
    options: {}
  });
  var ctx2 = document.getElementById("myChart2").getContext("2d");
  var myBarChart2 = new Chart(ctx2, {
    type: 'radar',
    data: {
      labels: ["星期一", "星期二", "星期三", "星期四", "星期五","星期六","星期日"],
      datasets: [
        {
          pointBorderColor:"#C064A7",//描点颜色
          pointBackgroundColor:"#fff",//描点背景颜色
          borderColor:"#C064A7",//画线颜色
          data: [15,25,35,45,55,65,75]
        }
      ]
    },
    options:{
      legend:false,//数据项
      scale: {
        ticks: {
          beginAtZero: true,
          stepSize:20,//Y轴间隔
          max:100,//Y轴最大值
          min:0,
          callback:function(value) { return value + '%'; }//Y轴格式化
        },
        angleLines:{
          display:false//雷达辐射轴
        },
        pointLabels:{
          fontSize:13//x轴文字
        },
      },
      animation:{
        onComplete:function(){
          document.getElementById("radar").innerHTML = "<img src='" + myBarChart.toBase64Image() + "' />";
        }
      }
    }
  });
  var ctx3 = document.getElementById("myChart3");
  var myChart3 = new Chart(ctx3, {
    type: 'bar',
    data: {
      labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
      datasets: [{
        label: '# of Votes',
        data: [12, 19, 3, 5, 2, 3],
        backgroundColor: [
          'rgba(255, 99, 132, 0.2)',
          'rgba(54, 162, 235, 0.2)',
          'rgba(255, 206, 86, 0.2)',
          'rgba(75, 192, 192, 0.2)',
          'rgba(153, 102, 255, 0.2)',
          'rgba(255, 159, 64, 0.2)'
        ],
        borderColor: [
          'rgba(255,99,132,1)',
          'rgba(54, 162, 235, 1)',
          'rgba(255, 206, 86, 1)',
          'rgba(75, 192, 192, 1)',
          'rgba(153, 102, 255, 1)',
          'rgba(255, 159, 64, 1)'
        ],
        borderWidth: 1
      }]
    },
    options: {
      scales: {
        yAxes: [{
          ticks: {
            beginAtZero:true
          }
        }]
      }
    }
  });
</script>